/**
 * Copyright 2018 orivil.com. All rights reserved.
 * Use of this source code is governed by a MIT-style
 * license that can be found at https://mit-license.org.
 */

package md5

import (
	"crypto/md5"
	"fmt"
)

func StrToMD5(str string) string {
	hex := md5.Sum([]byte(str))
	return fmt.Sprintf("%x", hex)
}
